﻿/*                              
   Copyright 2011 Nils Kopal, Christopher Krüger, Simone Sauer, Dennis Nolte, Uni Duisburg-Essen

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
using System;
using Sharebert.OverlayLibrary.API;
using Sharebert.LinkLayerLibrary;
using Sharebert.OverlayLibrary.Messages;

namespace Sharebert.OverlayLibrary
{

    public class NeighboursReceivedEventArgs : EventArgs
    {
        public NeighboursReceivedEventArgs(NeighbourList neighbours, string myIP)
        {
            this.Neighbours = neighbours;
            this.MyIP = myIP;
        }

        public NeighbourList Neighbours { get; private set; }

        public string MyIP { get; private set; }
    }

    public class PeerConnectionEventArgs : EventArgs
    {
        public PeerConnectionEventArgs(PeerConnection peerConnection)
        {
            this.Connection = peerConnection;
        }

        public PeerConnection Connection { get; private set; }
    }

    public class OverlayMessageReceivedEventArgs : EventArgs
    {
        public OverlayMessageReceivedEventArgs(IOverlayMessage message, byte[] payload)
        {
            this.Message = message;
            this.Payload = payload;
        }

        public IOverlayMessage Message { get; private set; }

        public byte[] Payload { get; private set; }
    }

}
